package com.chenfan.mcn.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author tangwei
 * Date:     2021/2/5 16:43
 * Description: 执行单来源
 */
@SuppressWarnings("AlibabaEnumConstantsMustHaveComment")
@AllArgsConstructor
public enum ExcutionOrderSourceEnum {

    /**
     * 执行单来源
     */

    INCOME_CONTRACT(0, "收入合同执行单"),

    INCOME_CONTRACT_AGREEMENT(1, "收入合同补充协议执行单"),
    ;

    @Getter
    private Integer type;

    @Getter
    private String desc;

    public static boolean isFromContract(Integer type) {
        return ExcutionOrderSourceEnum.INCOME_CONTRACT.getType().equals(type);
    }

    public static boolean isFromContractAgreement(Integer type) {
        return ExcutionOrderSourceEnum.INCOME_CONTRACT_AGREEMENT.getType().equals(type);
    }

}